package com.celeritymq.configure;

import java.util.Locale;
import java.util.Map;
import java.util.Properties;

import com.celeritymq.dispatcher.Dispatcher;

public class Base {
	static String BASE="base.cfg";
	static String configPath;
	static Locale locale;
	static String dateFormat;
	static int destination_port;
	static String destination_ip;
	static int transport_port;
	static String transport_ip;
	static Map<String, Dispatcher> dispatchers;
	static Properties properties;

	public static Locale locale() {
		return locale;
	}

	public static String format() {
		return dateFormat;
	}

	public static Dispatcher getDispatcher(String dispatcherName) {
		return dispatchers.get(dispatcherName);
	}

	public static int destinationPort() {
		return destination_port;
	}

	public static String destinationIp() {
		return destination_ip;
	}

	public static int transportPort() {
		return transport_port;
	}

	public static String transportIp() {
		return transport_ip;
	}

	public static String configPath() {
		return configPath;
	}

	public static String getProperty(String key, String defaultValue) {
		return properties.getProperty(key, defaultValue);
	}

	public static String getProperty(String key) {
		return properties.getProperty(key);
	}

	
}
